package cn.tedu.reflection;
/*用于学习反射的物料类*/
public class Student {
    private String name;
    public int age;
    public int age2;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Student() {
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Student(String name, int age, int age2) {
        this.name = name;
        this.age = age;
        this.age2 = age2;
    }

    public void play(){
        System.out.println("今天大结局");
    }
    public void eat(int n){
        System.out.println("今天要吃"+n+"道好菜");
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", age2=" + age2 +
                '}';
    }
}
